package com.ruoyi.common.core.domain.entity;

import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excels;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 部门表 sys_dept
 * 
 * @author ruoyi
 */
@ApiModel(value = "SysDept",description="部门")
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Builder
public class SysDept extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 部门ID */

    private Long deptId;

    /** 父部门ID */
    private Long parentId;

    /** 祖级列表 */
    private String ancestors;

    /** 部门名称 */
    @Excel(name = "公司名称")
    @ApiModelProperty(name="deptName", value="名称")
    @NotBlank(message = "部门名称不能为空")
    @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
    private String deptName;

    /** 显示顺序 */
    @Excel(name = "显示顺序")
    @NotNull(message = "显示顺序不能为空")
    @ApiModelProperty(name="orderNum", value="显示顺序")
    private Integer orderNum;

    /** 负责人 */
    @Excel(name = "负责人")
    @ApiModelProperty(name="leader", value="负责人")
    private String leader;

    /** 联系电话 */
    @Excel(name = "负责人电话")
    @ApiModelProperty(name="phone", value="联系电话")
    @Size(min = 0, max = 12, message = "联系电话长度不能超过11个字符")
    private String phone;

    /** 邮箱 */
    @Excel(name = "负责人邮箱")
    @ApiModelProperty(name="email", value="邮箱")
    @Email(message = "邮箱格式不正确")
    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
    private String email;

    /** 部门状态:0正常,1停用 */
    @Excel(name = "公司状态", readConverterExp = "0=正常,1=停用")
    @ApiModelProperty(name="status", value="状态")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 父部门名称 */
    private String parentName;

    /** 子部门 */
    private List<SysDept> children = new ArrayList<SysDept>();

    /** 服务商logo */
    @ApiModelProperty(name="logo", value="服务商logo")
    private String logo;

    /** 服务商banner图 */
    @ApiModelProperty(name="banner", value="服务商banner图")
    private String banner;

    /** 服务商类型 */
    @ApiModelProperty(name="type", value="服务商类型（选择框-字典表）")
    private Integer type;


    /** 服务商简介 */
    @ApiModelProperty(name="intro", value="服务商简介")
    private String intro;


    /** 标签（0-企业，1-服务商） */
    @Excel(name = "标签", readConverterExp = "0=企业，1=服务商")
    @ApiModelProperty(name="deptTag", value="标签（0=企业，1=服务商）")
    private String deptTag;

    /**
     * 省份编码
     */
    @ApiModelProperty(name = "provinceCode", value = "省份编码")
    private String provinceCode;

    /**
     * 城市编码
     */
    @ApiModelProperty(name = "cityCode", value="城市编码")
    private String cityCode;

    /**
     * 县区编码
     */
    @ApiModelProperty(name = "areaCode", value = "县区编码")
    private String areaCode;

    /**
     * 区域地址
     */
    @Size(max = 64, message = "最多输入64位字符")
    @ApiModelProperty(name = "address", value = "区域地址")
    private String address;

    /**
     * 详细地址
     */
    @Size(max = 64, message = "最多输入64位字符")
    @ApiModelProperty(name = "detailAddress", value = "详细地址", allowableValues = "range[0, 64]")
    private String detailAddress;

    /** 诊断状态（0未开始 1 开始） */
    @Excel(name = "诊断状态", readConverterExp = "0未开始 1 开始")
    @ApiModelProperty(name="diagnoseStatus", value="诊断状态")
    private String diagnoseStatus;

    /**
     * 诊断进度
     */
    @Size(max = 200, message = "最多输入200位字符")
    @ApiModelProperty(name = "diagnosePlan", value = "诊断进度")
    private String diagnosePlan;

    /**
     * 测评状态（0 未完成  1 已完成）
     */
    @ApiModelProperty(name = "testStatus", value = "测评状态（0 未完成  1 已完成）")
    private String testStatus;

    public String getLeader() {
        return leader;
    }

    public void setLeader(String leader) {
        this.leader = leader;
    }
}
